"Lluvia de Chispas" by Gold Lyle

Include Spanish by Sebastian Arg.
Include Glulx Boxed Quotation by Eliuk Blau.
Include Status Line Removal by Emily Short.
Include Basic Screen Effects Sp by Emily Short.
Include Inline Hyperlinks by Erik Temple.

Use boxed quotation without frame.

Part 0 - Utilidades

Chapter 0 - Tratamiento de cadenas y listas

Section 1 - Cadena vacía

To decide if (cad - an indexed text) is empty:
	if cad is "":
		yes;
	otherwise:
		no.
		
To decide if (cad - an indexed text) is filled:
	if cad is "":
		no;
	otherwise:
		yes.
		
Section 2 - Decir una lista con 'o' al final en lugar de y

To say (L - a list of sayable value) with disjunctive ending:
	let N be the number of entries in L;
	repeat with item running through L:
		say "[item]";
		decrease N by 1;
		if N is 1:
			say " o ";
		otherwise if N is not 0:
			say ", ".
			
To say (L - a list of sayable value) with disjunctive ending and links:
	let N be the number of entries in L;
	repeat with item running through L:
		say "[w][item][\w]";
		decrease N by 1;
		if N is 1:
			say " o ";
		otherwise if N is not 0:
			say ", ".
			
Section 3 - Forma corta de indicar un enlace

To say w:
	say link.
	
To say \w:
	say end link.

Chapter 1 - El prompt cambiante

Prompt Variable is a text that varies.

When play begins:
	now the command prompt is " [italic type]".
	
Before reading a command when normal prompt:  [ Hecho así para que se pinten los hiperenlaces ]
	calculate prompt;
	say "[Prompt Variable]".
	
To calculate prompt:
	if nombre chica is filled:
		now prompt variable is "Dígame, [nombre chica], ¿entonces qué hizo?";
	otherwise:
		now prompt variable is "¿Qué hizo entonces?".
	
After reading a command when normal prompt:
	say roman type;
	say command clarification break.
	
Chapter 2 - Voces

Section 1 - Roslyn

To roslyn (msj - a text):
	say msj;
	say paragraph break.
	
Section 2 - Chica

To chica (msj - a text):
	say italic type;
	say msj;
	say roman type;
	say paragraph break.
	
Chapter 3 - Datos

Section 1 - La chica

Nombre Chica is a indexed text that varies. Nombre chica is usually "".
Altura Chica is a number that varies. Altura Chica is usually 0.
Peso Chica is a number that varies. Peso Chica is usually 0.
Chica Experimentada is a truth state that varies. Chica Experimentada is usually false.

Chapter 4 - Preguntando datos

Section 1 - Variables

Answer is an indexed text that varies. Answer is usually "".
Question is an text that varies. Question is usually "".

Section 2 - Preguntando preguntas


To decide if normal prompt:
	if question is "":
		yes;
	otherwise:
		no.

To decide if asking a question:
	if question is "":
		no;
	otherwise if number of entries in current options is 0:
		yes;
	otherwise:
		no.
		
To decide if asking a question with options:
	if question is "":
		no;
	otherwise if number of entries in current options is 0:
		no;
	otherwise:
		yes.
		
[Before reading a command:
	say "[if normal prompt]NO[end if][if asking a question]YES[end if][if asking a question with options]OPTIONS[end if].".]
		
Section 3 - La lista de preguntas
		
Asked question is a kind of value. The asked questions are asking the name, asking the height, asking the weight, asking experience.

The current asked question is an asked question that varies.

The current options is a list of indexed texts that varies. The current options is usually {}.

To assign (value - an indexed text) to (concept - an asked question):
	if concept is asking the name:
		now Nombre Chica is value;
	otherwise if concept is asking the height:
	[  {"alta","normal","baja","pequeña"} ]
		if value is "baja" or value is "pequeña": 
			change altura chica to 0;
		otherwise if value is "normal":
			change altura chica to 1;
		otherwise if value is "alta":
			change altura chica to 2;
	otherwise if concept is asking the weight:
	[  {"flaca","normal","robusta"} ]
		if value is "flaca": 
			change peso chica to 0;
		otherwise if value is "normal":
			change peso chica to 1;
		otherwise if value is "robusta":
			change peso chica to 2;
	otherwise if concept is asking experience:
	[ {"sí","no"} ]
		if value is "sí":
			change chica experimentada to true;
		otherwise:
			change chica experimentada to false.
	
To finalize (concept - an asked question):
	if concept is asking the name:
		preguntas indiscretas segunda parte;
	otherwise if concept is asking the height:
		preguntas indiscretas tercera parte;
	otherwise if concept is asking the weight:
		preguntas indiscretas cuarta parte.
	
Section 4 - Pregunta, phrases

To ask (quest - a text) as (concept - an asked question):
	now answer is "";
	now question is quest;
	now current asked question is concept.
	
To ask (quest - a text) as (concept - an asked question) between (opts - a list of texts):
	now answer is "";
	now question is quest;
	now current asked question is concept;
	change current options to opts.
	
To decide if (word - an indexed text) is a current option:
	if word is listed in current options:
		yes;
	otherwise:
		no.
		
To decide if (word - an indexed text) is not a current option:
	if word is listed in current options:
		no;
	otherwise:
		yes.
		
Section 5 - Pregunta, after reading a command rules

Before reading a command when asking a question or asking a question with options:
	say "[question][command clarification break]".

After reading a command when asking a question:
	say roman type;
	say command clarification break;
	if the number of words in the player's command is greater than 1: 
		roslyn "Lo siento, pero tengo que rellenar un formulario simple, responda con sólo una palabra, por favor."; 
		chica "Oh, lo siento. De acuerdo.";
		reject the player's command; 
	now question is "";
	assign the player's command to current asked question;
	finalize the current asked question;
	reject the player's command.
	

After reading a command when asking a question with options:
	say roman type;
	say command clarification break;
	if the number of words in the player's command is greater than 1: 
		roslyn "Lo siento, pero tengo que rellenar un formulario simple, responda con sólo una palabra, por favor."; 
		chica "Oh, lo siento. De acuerdo.";
		reject the player's command; 
	if the player's command is not a current option:
		roslyn "No estoy segura de lo que quiere decir con eso. Limítese a responder una palabra, como, por ejemplo: [current options with disjunctive ending and links].";
		chica "Está bien.";
		reject the player's command;
	now question is "";
	assign the player's command to current asked question;
	finalize the current asked question;
	reject the player's command.


Part 1 - Inicio

Chapter 1 - Box

Section 1 - Quotations

To poner cuadro de inicio:
	display the boxed quotation
	"
	Lluvia de Chispas

	
	Johan Paz. 2011
	";
	show the current quotation.
	
Section 2 - Preguntas iniciales

To preguntas indiscretas inicio:
	roslyn "Saludos, soy Roslyn Fairchild.";
	chica "¿La periodista!";
	roslyn "La misma, he venido a entrevistarla.";
	chica "¡Qué bien!";
	roslyn "No es para tanto.";
	chica "¡La Roslyn! ¡Entrevistándome a mí!";
	roslyn "Sí, sí, no me gaste el nombre.";
	chica "¡Madre mía! ¡Ninguno de mis amigos se lo va a creer!";
	roslyn "Bueno...";
	chica "Roslyn, la de 'Noticas A Ras De Pista', ¿verdad?. No me confundo, ¿no?";
	roslyn "Eh... sí, esto... así es... ¿podríamos... centrarnos?";
	chica "¡Claro! ¡Dispare!";
	roslyn "(tal vez más adelante...)";
	chica "¿Qué dice?";
	roslyn "Nada, nada... pues venía a entrevistarla porque creo que ha sido su primera carrera aquí con nosotros en el Circuito Loytas";
	chica "¡Sí! ¡Así es! ¡Mi primera vez aquí!";
	roslyn "Qué efusiva... ¿Te importa si rellenamos un pequeño formulario primero?";
	chica "¡No! ¡Claro que no me importa! ¡Dispare!";
	roslyn "Veamos, lo primero sería su nombre.";
	ask "¿Cuál es su seudónimo para las carreras?" as asking the name.
	
To preguntas indiscretas segunda parte:
	roslyn "No está mal el nombre '[nombre chica]'... '[nombre chica]'... sí, podría funcionar en Loytas.";
	chica "¡Oh! Gracias, me costó mucho escogerlo.";
	roslyn "De acuerdo, hablemos de su estatura. En la actualidad la mayor parte de los corredores son pequeños y delgados.";
	ask "¿Cómo se considera usted? ¿[w]Alta[\w]? ¿De estatura [w]normal[\w]? ¿o más bien [w]baja[\w]?" as asking the height between {"alta","normal","baja","pequeña"}.
	
To preguntas indiscretas tercera parte:
	ask "¿Y en cuanto a complexión? ¿[w]Flaca[\w]? ¿[w]Robusta[\w]? ¿[w]Normal[\w]?" as asking the weight between {"flaca","normal","robusta"}.
	
To preguntas indiscretas cuarta parte:
	ask "Y antes de esta, ¿había estado en muchas carreras?" as asking experience between {"sí", "no"}.
	

Section 3 - When play begins

When play begins:
	poner cuadro de inicio;
	wait for any key;
	clear the screen;
	preguntas indiscretas inicio.
	
Section 3 - Cambiar el banner inicial

Rule for printing the banner text: do nothing

Part 2 - Carrera

Chapter 1 - Un lugar cualquiera

Section 1 - Definición

Lugar is a room.

Section 2 - No imprimir el nombre

Instead of looking:
	do nothing.